//
//  HMDoorUserBind.h
//  HomeMateSDK
//
//  Created by liqiang on 2017/12/13.
//  Copyright © 2017年 orvibo. All rights reserved.
//

#import "HMBaseModel.h"

@interface HMDoorUserBind : HMBaseModel
@property (nonatomic, strong) NSString *bindId;
@property (nonatomic, strong) NSString *userId;
@property (nonatomic, strong) NSString *extAddr;
@property (nonatomic, assign) int authorizedId;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *fp1;
@property (nonatomic, strong) NSString *fp2;
@property (nonatomic, strong) NSString *fp3;
@property (nonatomic, strong) NSString *fp4;
@property (nonatomic, strong) NSString *pwd1;
@property (nonatomic, strong) NSString *pwd2;


+ (HMDoorUserBind *)objectForBindId:(NSString *)bindId;
+ (HMDoorUserBind *)objectForextAddr:(NSString *)extAddr authorizedId:(int)authorizedId;
+ (NSMutableArray *)objectForextAddr:(NSString *)extAddr;
+ (BOOL)deleteAllObjectWithExtAddr:(NSString *)extAddr;
// 获取临时授权用户
+(NSMutableArray *)selectTempUserWithDevice:(HMDevice *)device;


/**
 得到排序的门锁用户： 按updatetime升序，并且门锁用户在前，临时用户在后

 @param extAddr
 @return
 */
+ (NSMutableArray *)sortedDoorUsersForextAddr:(NSString *)extAddr;
@end
